package com.gimi.cloud.bbp.manage.consumer.service.task;

import com.gimi.cloud.bbp.common.utils.reqhead.Response;
import com.gimi.cloud.bbp.dto.log.LogScheduleJobDTO;
import com.gimi.cloud.bbp.dto.task.ScheduleJobDTO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 定时任务相关service
 *
 * @author wbj
 * @version 1.0
 * @Description
 * @create 2018-02-06
 **/
public interface ScheduleJobService {

    /**
     * 获取定时任务列表
     * @param scheduleJobDTO 查询参数
     */
    Response getTaskList(HttpServletRequest request, HttpServletResponse response,ScheduleJobDTO scheduleJobDTO);

    /**
     * 获取定时任务信息
     * @param scheduleJobDTO
     */
    Response getTaskInfo(HttpServletRequest request, HttpServletResponse response,ScheduleJobDTO scheduleJobDTO);

    /**
     * 添加定时任务
     * @param scheduleJobDTO 待添加的定时任务
     */
    Response addTask(HttpServletRequest request, HttpServletResponse response,ScheduleJobDTO scheduleJobDTO);

    /**
     * 更新定时任务
     * @param scheduleJobDTO 待更新的定时任务
     */
    Response updateTask(HttpServletRequest request, HttpServletResponse response,ScheduleJobDTO scheduleJobDTO);

    /**
     * 删除定时任务
     * @param scheduleJobDTO 待删除的定时任务
     */
    Response deleteTask(HttpServletRequest request, HttpServletResponse response,ScheduleJobDTO scheduleJobDTO);

    /**
     * 执行定时任务
     * @param scheduleJobDTO 待执行的定时任务
     */
    Response runTask(HttpServletRequest request, HttpServletResponse response,ScheduleJobDTO scheduleJobDTO);

    /**
     * 暂停定时任务
     * @param scheduleJobDTO 待暂停的定时任务
     */
    Response pauseTask(HttpServletRequest request, HttpServletResponse response,ScheduleJobDTO scheduleJobDTO);

    /**
     * 启动定时任务
     * @param scheduleJobDTO 待启动的定时任务
     */
    Response resumeTask(HttpServletRequest request, HttpServletResponse response,ScheduleJobDTO scheduleJobDTO);

    /**
     * 重持久化任务
     * @param request
     * @param response
     * @param scheduleJobDTO 待重持久化任务的数据
     */
    Response recreateTask(HttpServletRequest request,HttpServletResponse response,ScheduleJobDTO scheduleJobDTO);

    /**
     * 获取定时任务执行日志
     * @param request
     * @param response
     * @param dto 查询参数
     */
    Response getTaskLogList(HttpServletRequest request, HttpServletResponse response, LogScheduleJobDTO dto);
}
